package ch09;

class _09_StringEx1 {
	public static void main(String[] args) {		
		String str1 = "abc";
		String str2 = "abc";		
		System.out.println(str1 == str2); // true	
		System.out.println(str1.equals(str2)); // true
		System.out.println(System.identityHashCode("abc")); // 2118826169
		System.out.println(System.identityHashCode(str1));  // 2118826169
		System.out.println(System.identityHashCode(str2));  // 2118826169
		System.out.println();		
		
		String str3 = new String("abc");
		String str4 = new String("abc");	
		System.out.println(str3 == str4); // false	
		System.out.println(str3.equals(str4)); // true
	}
}